package org.dromara.project.domain.bo;

import org.dromara.project.domain.ProContract;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;

/**
 * 合同信息业务对象 qyx_pro_contract
 *
 * @author LUSH
 * @date 2025-05-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ProContract.class, reverseConvertGenerate = false)
public class ProContractBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 合同名称
     */
    private String contractName;

    /**
     * 合同编号
     */
    private String contractNumber;

    /**
     * 业主单位
     */
    private String ownerUnit;

    /**
     * 项目区域
     */
    private String projectRegion;

    /**
     * 执行总裁
     */
    private Long presidentId;

    /**
     * 合同签订时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date conSignTime;

    /**
     * 合同约定工期
     */
    private String conPeriod;

    /**
     * 合同预计结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date conEndTime;

    /**
     * 合同约定工作内容
     */
    private String conWorkContent;

    /**
     * 合同约定质量标准
     */
    private String conQualityStandard;

    /**
     * 合同总金额
     */
    // @NotNull(message = "合同总金额不能为空", groups = { AddGroup.class, EditGroup.class })
    @DecimalMin(value = "0.0", inclusive = true, message = "合同总金额不能小于0", groups = { AddGroup.class, EditGroup.class })
    @DecimalMax(value = "999999999.99", inclusive = true, message = "合同总金额不能超过999999999.99", groups = { AddGroup.class, EditGroup.class })
    @Digits(integer = 9, fraction = 2, message = "合同总金额最多支持9位整数和2位小数", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal conTotalAmount;

    /**
     * 付款方式
     */
    private String paymentMethod;

    /**
     * 合同是否有延期约定（0否1是）
     */
    private String hasExtension;

    /**
     * 合同延期约定内容
     */
    private String extensionContent;

    /**
     * 备注
     */
    private String remark;


}
